Force emoji presentation
authorMatthias Clasen <mclasen@redhat.com>
Tue, 27 Nov 2018 23:16:43 +0000 (18:16 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 30 Nov 2018 21:20:44 +0000 (16:20 -0500)
Append a variation selector to the Emoji sequences,
to force Emoji presentation. Without this, some
Emoji come out with text presentation by default.

Closes: Pango #334
gtk/gtkemojichooser.c
gtk/gtkemojicompletion.c

index a829884fccd3c0dff7098f37b13912d6e2bf9238..d8124cb90fc55b412a919d2ba30a515a300e9a1d 100644 (file)
@@ -361,6 +361,7 @@ add_emoji (GtkWidget    *box,
         p += g_unichar_to_utf8 (code, p);
     }
   g_variant_unref (codes);
+  p += g_unichar_to_utf8 (0xFE0E, p); /* U+FE0F is the Emoji variation selector */
   p[0] = 0;
 
   label = gtk_label_new (text);
index e7583126d9a46e5c30641a13b5c1aec4dc61d6be..058e1867e27761c11d3daa879818105eefd11848 100644 (file)
@@ -452,6 +452,7 @@ get_text (GVariant *emoji_data,
         p += g_unichar_to_utf8 (code, p);
     }
   g_variant_unref (codes);
+  p += g_unichar_to_utf8 (0xFE0F, p); /* U+FE0F is the Emoji variation selector */
   p[0] = 0;
 }